package com.syni.mdd.yhd.common.all.listen.order;

import com.syni.mdd.yhd.common.all.entity.BmsDxOrder;
import lombok.Data;
import org.springframework.context.ApplicationEvent;

import java.util.HashMap;
import java.util.Map;

/**
 * @className OrderListener
 * @description TOO
 * @Author cfx
 * @DATE 2019/8/8 15:46
 * @VERSION 1.0
 **/
@Data
public class OrderEvent extends ApplicationEvent {
    private BmsDxOrder bmsDxOrder;
    private Map<String,Object> userDataMap = new HashMap<>();
    private Double refundMoney;
    private Integer refundChannel;
    private String refundTag;

    public OrderEvent(Object source, BmsDxOrder bmsDxOrder) {
        super(source);
        this.bmsDxOrder = bmsDxOrder;
    }

    public OrderEvent(Object source, BmsDxOrder bmsDxOrder,Map<String,Object> userDataMap) {
        super(source);
        this.bmsDxOrder = bmsDxOrder;
        this.userDataMap.putAll(userDataMap);
    }

    public OrderEvent(Object source,BmsDxOrder bmsDxOrder,Double refundMoney,Integer refundChannel,String refundTag){
        super(source);
        this.bmsDxOrder = bmsDxOrder;
        this.refundMoney = refundMoney;
        this.refundChannel = refundChannel;
        this.refundTag = refundTag;

    }
}
